/*
 * Copyright (c) 2010 Olivier Van Acker
 *
 * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php
 */

package org.transformatorhuis.unix.server;

import com.sun.jna.Library;
import com.sun.jna.Native;
import com.sun.jna.Pointer;
import com.sun.jna.StringArray;
import com.sun.jna.ptr.IntByReference;

/**
 * User: Olivier Van Acker
 * Date: Mar 12, 2010
 */
public interface THLibrary extends Library {
    int fork();

    int kill(int pid, int signum);

    int getpid();

    int execv(String file, StringArray args);

    String strerror(int errno);

    int sysctl(int[] mib, int nameLen, Pointer oldp, IntByReference oldlenp, Pointer newp, IntByReference newlen);

    public static final THLibrary THLIB = (THLibrary) Native.loadLibrary("c", THLibrary.class);

}
